<extend name="base/Base" />
<block name="Style">
<!-- FooTable Plugin CSS -->
		<link rel="stylesheet" type="text/css" href="__ABSOLUTEADMIN__/vendor/plugins/footable/css/footable.core.min.css">
		<!-- Admin Forms CSS -->
		<link rel="stylesheet" type="text/css" href="__ABSOLUTEADMIN__/assets/admin-tools/admin-forms/css/admin-forms.css">
		
		<js href="__ADDON__/ueditor/js/jquery-1.11.0.min.js" />
		<js href="__ADDON__/ueditor/cms.admin.config.js" />    
		<js href="__ADDON__/ueditor/ueditor.all.min.js" />
		<link rel="stylesheet" href="/public/addon/style/css/bootstrap-select.css">
		<script src="/public/addon/style/js/bootstrap-select.min.js"></script>
		<script>
		$(function(){
			var url="__APP__/Home/Ueditor/Index/Addon/Ueditor.html";
			var ue = UE.getEditor('container',{
				serverUrl :url,
				UEDITOR_HOME_URL:'__ADDON__/ueditor/',
			});
			

			ue.ready(function(){
				ue.execCommand('serverparam', {
					'uid': "<?php echo getUID(); ?>",
				   'username': '<?php echo getUID(); ?>',
				});
			});

		})
		</script>
	
		<js href="__ADDON__/ajaxupload/js/jquery.js" />
		<js href="__ADDON__/ajaxupload/js/ajaxupload.js" />
		<script type="text/javascript">
		$(function(){
			var button = $('#upload_button'), interval;
			var confirmdiv = $('#uploadphotoconfirm');
			var fileType = "pic",fileNum = "one"; 
			new AjaxUpload(button,{
				action: "__APP__/Home/Upload/Image/Addon/AjaxUpload.html",
				name: 'userfile',
				onSubmit : function(file, ext){
					if(fileType == "pic")
					{
						if (ext && /^(jpg|png|jpeg|gif|JPG)$/.test(ext)){
							this.setData({
								'info': '文件类型为图片'
							});
						} else {
							 confirmdiv.text('文件格式错误，请上传格式为.png .jpg .jpeg 的图片');
							return false;               
						}
					}
								
					confirmdiv.text('文件上传中');
					
					if(fileNum == 'one')
						this.disable();
					
					interval = window.setInterval(function(){
						var text = confirmdiv.text();
						if (text.length < 14){
							confirmdiv.text(text + '.');                    
						} else {
							confirmdiv.text('文件上传中');             
						}
					}, 200);
				},
				onComplete: function(file, response){
					if(response != "success"){
						if(response =='2'){
							confirmdiv.text("文件格式错误，请上传格式为.png .jpg .jpeg 的图片");
						}else{
							
							confirmdiv.text("上传完成");
							
							$("#newbikephotoName").val(response);
							$("#newbikephoto").attr("src",response);	
							$("#imgurl").attr("value",response);						
							
						}
						
					}
										  
					window.clearInterval(interval);
								
					this.enable();
					
					if(response == "success")
					alert('上传成功');              
				}
			});
		});
		
		
		$(function(){
			var button = $('#upload_button1'), interval;
			var confirmdiv = $('#uploadphotoconfirm1');
			var fileType = "pic",fileNum = "one"; 
			new AjaxUpload(button,{
				action: "__APP__/Home/Upload/Image/Addon/AjaxUpload.html",
				name: 'userfile',
				onSubmit : function(file, ext){
					if(fileType == "pic")
					{
						if (ext && /^(jpg|png|jpeg|gif|JPG)$/.test(ext)){
							this.setData({
								'info': '文件类型为图片'
							});
						} else {
							 confirmdiv.text('文件格式错误，请上传格式为.png .jpg .jpeg 的图片');
							return false;               
						}
					}
								
					confirmdiv.text('文件上传中');
					
					if(fileNum == 'one')
						this.disable();
					
					interval = window.setInterval(function(){
						var text = confirmdiv.text();
						if (text.length < 14){
							confirmdiv.text(text + '.');                    
						} else {
							confirmdiv.text('文件上传中');             
						}
					}, 200);
				},
				onComplete: function(file, response){
					if(response != "success"){
						if(response =='2'){
							confirmdiv.text("文件格式错误，请上传格式为.png .jpg .jpeg 的图片");
						}else{
							
							confirmdiv.text("上传完成");
							
							$("#newbikephotoName1").val(response);
							$("#newbikephoto1").attr("src",response);	
							$("#imgurl1").attr("value",response);						
							
						}
						
					}
										  
					window.clearInterval(interval);
								
					this.enable();
					
					if(response == "success")
					alert('上传成功');              
				}
			});
		});
		
		$(function(){
			var button = $('#upload_button2'), interval;
			var confirmdiv = $('#uploadphotoconfirm2');
			var fileType = "pic",fileNum = "one"; 
			new AjaxUpload(button,{
				action: "__APP__/Home/Upload/Image/Addon/AjaxUpload.html",
				name: 'userfile',
				onSubmit : function(file, ext){
					if(fileType == "pic")
					{
						if (ext && /^(jpg|png|jpeg|gif|JPG)$/.test(ext)){
							this.setData({
								'info': '文件类型为图片'
							});
						} else {
							 confirmdiv.text('文件格式错误，请上传格式为.png .jpg .jpeg 的图片');
							return false;               
						}
					}
								
					confirmdiv.text('文件上传中');
					
					if(fileNum == 'one')
						this.disable();
					
					interval = window.setInterval(function(){
						var text = confirmdiv.text();
						if (text.length < 14){
							confirmdiv.text(text + '.');                    
						} else {
							confirmdiv.text('文件上传中');             
						}
					}, 200);
				},
				onComplete: function(file, response){
					if(response != "success"){
						if(response =='2'){
							confirmdiv.text("文件格式错误，请上传格式为.png .jpg .jpeg 的图片");
						}else{
							
							confirmdiv.text("上传完成");
							
							$("#newbikephotoName2").val(response);
							$("#newbikephoto2").attr("src",response);	
							$("#imgurl2").attr("value",response);						
							
						}
						
					}
										  
					window.clearInterval(interval);
								
					this.enable();
					
					if(response == "success")
					alert('上传成功');              
				}
			});
		});
		
		
		$(function(){
			var button = $('#upload_button3'), interval;
			var confirmdiv = $('#uploadphotoconfirm3');
			var fileType = "pic",fileNum = "one"; 
			new AjaxUpload(button,{
				action: "__APP__/Home/Upload/Image/Addon/AjaxUpload.html",
				name: 'userfile',
				onSubmit : function(file, ext){
					if(fileType == "pic")
					{
						if (ext && /^(jpg|png|jpeg|gif|JPG)$/.test(ext)){
							this.setData({
								'info': '文件类型为图片'
							});
						} else {
							 confirmdiv.text('文件格式错误，请上传格式为.png .jpg .jpeg 的图片');
							return false;               
						}
					}
								
					confirmdiv.text('文件上传中');
					
					if(fileNum == 'one')
						this.disable();
					
					interval = window.setInterval(function(){
						var text = confirmdiv.text();
						if (text.length < 14){
							confirmdiv.text(text + '.');                    
						} else {
							confirmdiv.text('文件上传中');             
						}
					}, 200);
				},
				onComplete: function(file, response){
					if(response != "success"){
						if(response =='2'){
							confirmdiv.text("文件格式错误，请上传格式为.png .jpg .jpeg 的图片");
						}else{
							
							confirmdiv.text("上传完成");
							
							$("#newbikephotoName3").val(response);
							$("#newbikephoto3").attr("src",response);	
							$("#imgurl3").attr("value",response);						
							
						}
						
					}
										  
					window.clearInterval(interval);
								
					this.enable();
					
					if(response == "success")
					alert('上传成功');              
				}
			});
		});
		
		</script>

</block>
<block name="Topbar">
				
<header id="topbar" class="ph10">
        <div class="topbar-left">
          <ul class="nav nav-list nav-list-topbar pull-left">
           
			<li    >
              <a  href="__APP__/Mall/Classify/album.html"   >专辑管理</a>
            </li>
			<li  class="active"   >
              <a href="#"    >编辑专辑</a>
            </li>
           
          </ul>
        </div>
	</header>				
 <!-- Start: Topbar -->
	  						
    				
</block>
<block name="Content">

<!-- START ROW -->

	<div class="row">

		<!-- NEW COL START -->
		<article class="col-md-offset-1 col-sm-12 col-md-12 col-lg-10">
			
			<!-- Widget ID (each widget will need unique ID)-->
			<div class="jarviswidget" id="wid-id-7" data-widget-editbutton="false" data-widget-custombutton="false">
				<!-- widget options:
					usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
					
					data-widget-colorbutton="false"	
					data-widget-editbutton="false"
					data-widget-togglebutton="false"
					data-widget-deletebutton="false"
					data-widget-fullscreenbutton="false"
					data-widget-custombutton="false"
					data-widget-collapsed="true" 
					data-widget-sortable="false"
				-->
				

				<!-- widget div-->
				<div>
					
					<!-- widget edit box -->
					<div class="jarviswidget-editbox">
						<!-- This area used as dropdown edit box -->
						
					</div>
					<!-- end widget edit box -->
					
					<!-- widget content -->
					<div class="widget-body no-padding">
						
						<form id="smart-form-register" action="__APP__/Mall/User/Edit_album.html"  onsubmit="return tijiao()"   enctype="multipart/form-data" method="post" class="smart-form">
							<input type="hidden" name="form_id" value="{$data.id}"/>
							<div class="form-group col-md-6">
								<label for="exampleInputEmail1">请选择语言</label>
								<select class="form-control" name="langue">
									<volist name="langeue_list" id="langeue_list">
									<if condition="$langeue_list['id'] eq $data['langue']">
									<option value ="{$langeue_list.id}" selected="selected">|--  {$langeue_list.name}</option>
									<else/>
									<option value ="{$langeue_list.id}">|--  {$langeue_list.name}</option>
									</if>
									</volist>
								</select>
							  </div>
							<div class="form-group col-md-6">
								<label for="exampleInputEmail1">请选择流派风格</label>
								<select id="style" name="style[]" class="selectpicker show-tick form-control" multiple data-live-search="false">
									<volist name="style_list" id="style_list">
									<if condition="$style_list['if'] eq 1">
									<option value ="{$style_list.id}" selected="selected">{$style_list.name}</option>
									<else/>
									<option value ="{$style_list.id}">{$style_list.name}</option>
									</if>
									</volist>
								</select>
							  </div>
							 <div class="row">
								 <div class="col-md-4">
									 <div class="form-group">
										<label for="exampleInputEmail1">请输入专辑名称</label>
										<input type="text"  name="name" id="name" class="form-control"  placeholder="请输入专辑名称" value="{$data.name}">
									  </div>
								  </div>
								  
								 <div class="col-md-4">
									 <div class="form-group">
										<label for="exampleInputEmail1">请输入专辑唯一标示</label>
										<input type="text"  name="isrc" id="isrc" class="form-control"  placeholder="请输入专辑唯一标示" value="{$data.isrc}">
									  </div>
								  </div>
								  
								  <div class="col-md-4">
									   <div class="form-group">
										<label for="exampleInputEmail1">请输入歌手</label>
										<input type="text"  name="singer" id="singer" class="form-control"  placeholder="请输入歌手" value="{$data.singer}">
									  </div>
								  </div>
								  
								  <div class="col-md-4">
									   <div class="form-group">
										<label for="exampleInputEmail1">请输入出售单价</label>
										<input type="number"  name="money" id="money" class="form-control"  placeholder="请输入出售单价" value="{$data.money}">
									  </div>
								  </div>
								  
								   <div class="col-md-4">
									   <div class="form-group">
										<label for="exampleInputEmail1">请输入发行量</label>
										<input type="number"  name="inventory" id="inventory" class="form-control"  placeholder="请输入发行量" value="{$data.inventory}">
									  </div>
								  </div>
								  
								   <div class="col-md-4">
								  <div class="form-group">
								<label for="exampleInputEmail1">请选择发行时间</label>
								<input style="height:45px;" name="release_time" placeholder="请输入日期" value="{$data.release_time|date='Y-m-d',###}" class="form-control laydate-icon gui-input" onclick="laydate()">
								</div>
								</div>
							  </div>
							 <div class="col-md-3">
							   <section>
						<label class="control-label" for="bike_type">&nbsp;</label>
							<input type="file" style="display:none" name="userfile">
							<input type="hidden" id="newbikephotoName" name="img" value="{$data.img}" />
							<input type="hidden" id="oldbikephotoName" value="" />
							<div class="controls" style="text-align:center;">
								<img  id="newbikephoto" src="{$data.img}" style="max-height:200px;max-width:200px;" />
								<span class="help-inline"></span>
								<br>
								<div id="uploadphotoconfirm"></div>
								<br>
								<input type="hidden" name="img" id="imgurl" value="{$data.img}" style="max-height:200px;max-width:200px;"  >
								<input type="button" class="btn btn-lg btn-primary" style="width:50%" id="upload_button"  value="上传封面图" />
							</div>
							</section>
							 </div>
							  <div class="col-md-3">
							   <section>
							<label class="control-label" for="bike_type">&nbsp;</label>
							<input type="file" style="display:none" name="userfile">
							<input type="hidden" id="newbikephotoName1" name="bottom_img" value="{$data.bottom_img}" />
							<input type="hidden" id="oldbikephotoName1" value="" />
							<div class="controls" style="text-align:center;">
								<img  id="newbikephoto1" src="{$data.bottom_img}" style="max-height:200px;max-width:200px;" />
								<span class="help-inline"></span>
								<br>
								<div id="uploadphotoconfirm1"></div>
								<br>
								<input type="hidden" name="bottom_img" id="imgurl1" value="{$data.bottom_img}" style="max-height:200px;max-width:200px;"  >
								<input type="button" class="btn btn-lg btn-primary" style="width:50%" id="upload_button1"  value="上传封底图" />
							</div>
							</section>
							</div>
							
							  <div class="col-md-3">
							   <section>
							<label class="control-label" for="bike_type">&nbsp;</label>
							<input type="file" style="display:none" name="userfile">
							<input type="hidden" id="newbikephotoName2" name="banner_img" value="{$data.banner_img}" />
							<input type="hidden" id="oldbikephotoName2" value="" />
							<div class="controls" style="text-align:center;">
								<img  id="newbikephoto2" src="{$data.banner_img}" style="max-height:200px;max-width:200px;" />
								<span class="help-inline"></span>
								<br>
								<div id="uploadphotoconfirm2"></div>
								<br>
								<input type="hidden" name="banner_img" id="imgurl2" value="{$data.banner_img}" style="max-height:200px;max-width:200px;"  >
								<input type="button" class="btn btn-lg btn-primary" style="width:50%" id="upload_button2"  value="上传banner图" />
							</div>
							</section>
							</div>
							
							<div class="col-md-3">
								<a href='__APP__/Mall/Classify/zip_log/form_id/{$data.id}/type/4.html'>
								<div class='controls' style='text-align:center;'>
									<br/>
									<div style='height:40px;margin:auto;line-height:40px;' id="fileView"></div>
									<br/>
									<input type="button" class="btn btn-lg btn-primary" style="width:50%" id="btn1"  value="编辑内页" /><br/>
								</div>
								</a>
							</div>
							
							<div class="form-group">
								<textarea class="form-control" rows="3" name="intro" value="{$data.intro}" placeholder="请输入专辑介绍">{$data.intro}</textarea>
							</div>
							<br>
							<br>
							
							<footer>
							<style>
								*{
								margin:0;
								padding:0;
								}
								.mbt{
									margin:5px 0;
								}
								.bck{
								 background-image:url('/public/addon/style/img/timg.jpg');background-size:100%;
								 }
							</style>
								<ul  class='row'>
								<volist name="f_list" id="f_list" key="k">
										
										<input type="hidden" name="edit_id[]" value="{$f_list.id}">
										<li style="list-style:none;overflow:hidden">
										<div class='form-inline' style='height:20px;position:relative'>
											<span class='item1{$k} form-group' style='width:20px;height:20px;float:left;background: url(https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1524907023669&di=4f1451c653c70d6d01e402addcab9b4e&imgtype=0&src=http%3A%2F%2Fimgsrc.baidu.com%2Fimgad%2Fpic%2Fitem%2F91529822720e0cf3e3857ad00146f21fbe09aaae.jpg) no-repeat;background-size: 100%;'></span><span style='position:absolute;left:30%;' title ="+file.files[i].name+" class='form-group'>{$f_list.song_name}</span>&nbsp;<span style='position:absolute;left:60%;'>{$f_list.song_name[]}</span><span class='del1{$k}' style='float:right;cursor:pointer;'>删除</span>
											<!-- <input type='hidden' class='urlBox1' name='mp3[]' value=''/> -->
										</div>
											<!-- 字符串内容 -->
										<div class='col-md-4' style="display:none">
											<div class='form-group'>
											<label>请输入单曲名称</label>
											<input type='text' class='form-control'  placeholder='请输入单曲名称' value='{$f_list.name}' name="edit_name[]">
										  </div>
										</div>
										  
										  <div class="col-md-4" style="display:none">
										  <div class="form-group">
											<label for="exampleInputEmail1">请选择语言</label>
											<select class="form-control" name="edit_langues[]">
												{$langeue_str[$k-1]}
											</select>
										  </div>
										   </div>
										 
										  <br/>
										   <div class="col-md-4" style="display:none">
										  <div class="form-group">
											<label>请输入作词</label>
											<input type="text" class="form-control"  placeholder="请输入作词" name="edit_lyrics[]" value="{$f_list.lyrics}"/>
										  </div>
										  </div>
										  
										   <div class="col-md-4" style="display:none">
										  <div class="form-group">
											<label>请输入作曲</label>
											<input type="text" class="form-control"  placeholder="请输入作曲" name="edit_composes[]"  value="{$f_list.compose}"/>
										  </div>
										  </div>
										   <div class="col-md-4" style="display:none">
										  <div class="form-group">
											<label>请输入录音</label>
											<input type="text" class="form-control"  placeholder="请输入录音" name="edit_records[]" value="{$f_list.record}"/>
										  </div>
										  </div>
										   <div class="col-md-4" style="display:none">
										  <div class="form-group">
											<label>请输入混音</label>
											<input type="text" class="form-control"  placeholder="请输入混音" name="edit_mixings[]"  value="{$f_list.mixing}"/>
										  </div>
										  </div>
										   <div class="col-md-4" style="display:none">
										  <div class="form-group">
											<label>请输入演唱者</label>
											<input type="text" class="form-control"  placeholder="请输入演唱者" name="edit_singers[]" value="{$f_list.singer}"/>
										  </div>
										  </div>
										   <div class="col-md-4" style="display:none">
										  <div class="form-group">
											<label>请输入制作人</label>
											<input type="text" class="form-control"  placeholder="请输入制作人" name="edit_producer[]" value="{$f_list.producer}"/>
										  </div>
										  </div>
										   <div class="col-md-4" style="display:none">
										  <div class="form-group">
											<label>请输入出品方</label>
											<input type="text" class="form-control"  placeholder="请输入出品方" name="edit_producers[]" value="{$f_list.producers}"/>
										  </div>
										  </div>
										   <div class="col-md-4" style="display:none">
										  <div class="form-group">
											<label>上传歌词</label>
											<div class='bck' style='width:39px;height:39px;border:1px solid #ccc;cursor:pointer;overflow:hidden;border-radius:3px;' >
											<!-- /public/addon/style/img/time.jpg -->
												<input id= "edit_lyric{$k}" type="file"  class="lyric1" style='height:100%;opacity:0;'/>
												<input id='hid_lyric{$k}' type = "hidden" class='' value = '{$f_list.value}'  name="edit_music_lyrics[]"/> 
											</div>
											<span style='position:absolute;left:90px;top:25px;height:30px;width:200px;line-height:30px;'></span>
										  </div>
										  </div>
										   <div class="col-md-4" style="display:none">
										   
										  <div class="form-group" id='formcd'>
											<label>编辑歌词本底衬页</label>
											<a href="__APP__/Mall/Classify/zip_log/form_id/{$f_list.id}/type/2.html"> <div class='bck'   style='width:39px;height:39px;border:1px solid #ccc;cursor:pointer;overflow:hidden;border-radius:3px;' >
											</div> </a>
											<span style='position:absolute;left:90px;top:25px;height:30px;width:200px;line-height:30px;'></span>
										  </div>
										 
										  </div>
										  <div class="col-md-4" style="display:none">
										  
										  <div class="form-group" id='formcd'>
											<label>编辑宣传图</label>
											<a href="__APP__/Mall/Classify/zip_log/form_id/{$f_list.id}/type/3.html">
											<div  class='bck'  style='width:39px;height:39px;border:1px solid #ccc;cursor:pointer;overflow:hidden;border-radius:3px;' >
											</div>
											</a>
											<span style='position:absolute;left:90px;top:25px;height:30px;width:200px;line-height:30px;'></span>
										  </div>
										  
										  </div>
									</li>
									<script>
										var info_toggle = document.getElementsByClassName('item1{$k}')[0]
											info_toggle.onclick = function(){
													var el = sibling(this.parentNode)
													for(j in el){
														el[j].style.display =='block'?el[j].style.display = 'none':el[j].style.display = 'block';
													}
												}
										var info_del = document.getElementsByClassName('del1{$k}')[0]
												info_del.onclick = function(e){
													this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);
													delete_song({$f_list.id});
													
													
												}
										edit_lyric{$k}.onchange = function(e){
											if(edit_lyric{$k}.files.length>0){
												var  data = new FormData();
												data.append('upload_file{$k-1}',edit_lyric{$k}.files[0])
												var xhr = new XMLHttpRequest();
												xhr.onreadystatechange = function(){
													if(xhr.readyState==4){
														if(xhr.status ==200){
															console.log('请求成功')
															console.log(JSON.parse(xhr.responseText)[0].url)
															hid_lyric{$k}.value = JSON.parse(xhr.responseText)[0].url
														}
													}
												}
												xhr.open('post','__APP__/Mall/Classify/ajax_shangchuan',true);
												xhr.send(data);
												this.parentNode.nextSibling.nextSibling.innerHTML = this.files[0].name;
											}
										}
									</script>
								</volist>
								</ul>
								<ul id="songList" class='row'>
									
								</ul>
								<div title="选择歌曲" style="vertical-align:middle; overflow:hidden; width:auto;display:inline-block;position:relative;border:2px solid #000; padding:3px 16px; margin-bottom:2vh;color:#000;">
									<span  style='font-size:16px;'>+ 选择文件</span>
									<input id="file" type="file" multiple="multiple" name="music_song[]"  style="height:100%;width:100%;position:absolute;top:0;left:0;opacity:0;"/>
								</div>
								<button type="submit" class="btn btn-primary" style="width:100%">
									确认编辑
								</button>
							</footer>
							
<script type="text/javascript">
	var	num = 0 ;
	var songInfo = '' ;
	var del = undefined;
	var toggle = undefined;
	var bar ;
	var lyric;
	var chendi;
	var data;
	file.onchange = function(e){
		//添加文件
		if(file.files.length>0){
			for( var i = 0;i<file.files.length;i++){
			bar = file.files[i].name
			if(bar.length>10){
				bar = bar.slice(0,11)+'...';
			}
			songInfo = `<li style="list-style:none;overflow:hidden">
							<div class='form-inline' style='height:20px;position:relative'>
								<span class='item form-group' style='width:20px;height:20px;float:left;background: url(https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1524907023669&di=4f1451c653c70d6d01e402addcab9b4e&imgtype=0&src=http%3A%2F%2Fimgsrc.baidu.com%2Fimgad%2Fpic%2Fitem%2F91529822720e0cf3e3857ad00146f21fbe09aaae.jpg) no-repeat;background-size: 100%;'></span><span style='position:absolute;left:30%;' title ="+file.files[i].name+" class='form-group'>`+bar+`</span>&nbsp<span style='position:absolute;left:60%;'>`+(file.files[i].size/1024/1024).toFixed(2)+`MB</span><span class='del' style='float:right;cursor:pointer;'>删除</span>
								<input type='hidden' class='urlBox' name='mp3[]' value=''/>
							</div>
								<!-- 字符串内容 -->
							<div class='col-md-4' style="display:none">
								<div class='form-group'>
								<label>请输入单曲名称</label>
								<input type='text' class='form-control'  placeholder='请输入单曲名称' name="music_name[]" value=''>
							  </div>
							</div>
							  
							  <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label for="exampleInputEmail1">请选择语言</label>
								<select class="form-control" name="langues[]">
									{$langeue_strs}
								</select>
							  </div>
							   </div>
							  <!--  <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label for="exampleInputEmail1">请选择流派风格</label>
								 <select id="style" name="style[]" class="selectpicker show-tick form-control" multiple data-live-search="false">
									
									<option value ='1'>2</option>
									
								</select>
								<button type="button" class=" form-control btn dropdown-toggle bs-placeholder btn-default" data-toggle="dropdown" role="button" data-id="style" title="Nothing selected" aria-expanded="false"><span class="filter-option pull-left">Nothing selected</span>&nbsp;<span class="bs-caret"><span class="caret"></span></span></button>
							  </div>
							   </div>	 -->  
							  <br/>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入作词</label>
								<input type="text" class="form-control"  placeholder="请输入作词" name="lyrics[]"/>
							  </div>
							  </div>
							  
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入作曲</label>
								<input type="text" class="form-control"  placeholder="请输入作曲" name="composes[]"/>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入录音</label>
								<input type="text" class="form-control"  placeholder="请输入录音" name="records[]"/>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入混音</label>
								<input type="text" class="form-control"  placeholder="请输入混音" name="mixings[]"/>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入演唱者</label>
								<input type="text" class="form-control"  placeholder="请输入演唱者" name="singers[]"/>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入制作人</label>
								<input type="text" class="form-control"  placeholder="请输入制作人" name="producer[]"/>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入出品方</label>
								<input type="text" class="form-control"  placeholder="请输入出品方" name="producers[]"/>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>上传歌词</label>
								<div class='bck' style='width:39px;height:39px;border:1px solid #ccc;cursor:pointer;overflow:hidden;border-radius:3px;' >
								<!-- /public/addon/style/img/time.jpg -->
									<input type="file"  class="lyric" style='height:100%;opacity:0;' name="music_lyrics[]"/>
									<input type = "hidden" class='' value = ''/> 
								</div>
								<span style='position:absolute;left:90px;top:25px;height:30px;width:200px;line-height:30px;'></span>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group" id='formcd'>
								<label>上传歌词本底衬页</label>
								<div class='bck'   style='width:39px;height:39px;border:1px solid #ccc;cursor:pointer;overflow:hidden;border-radius:3px;' >
								<input type="file" class="chendi" style='height:100%;opacity:0;' name="foil_img[]" multiple />
								</div>
								<span style='position:absolute;left:90px;top:25px;height:30px;width:200px;line-height:30px;'></span>
								<input type="hidden" name="music_img_count[]" value=""/>
							  </div>
							  </div>
							  <div class="col-md-4" style="display:none">
							  <div class="form-group" id='formcd'>
								<label>上传宣传图</label>
								<div  class='bck'  style='width:39px;height:39px;border:1px solid #ccc;cursor:pointer;overflow:hidden;border-radius:3px;' >
								<input type="file" class="chendi" style='height:100%;opacity:0;' name="xuanchuan_img[]" multiple />
								</div>
								<span style='position:absolute;left:90px;top:25px;height:30px;width:200px;line-height:30px;'></span>
								<input type="hidden" name="xuanchuan_img_count[]" value=""/>
							  </div>
							  </div>
						</li>`
			songList.innerHTML+=songInfo;
			
               
			}
			var data = new FormData();
                //为FormData对象添加数据
                $.each(file.files, function(i, file) {
                    data.append('upload_file'+i, file);
                });
				xhr = new XMLHttpRequest();
			xhr.onreadystatechange= function(){
		if(xhr.readyState==4){
			if(xhr.status==200){
				res = JSON.parse(xhr.responseText);
				var urlBox = document.getElementsByClassName('urlBox');
				console.log(res)
				for(i in res){
					//console.log(res[i])
					urlBox[num].value = res[i].url;
					console.log(res[i].url)
					//console.log(urlBox[i])
					//console.log(urlBox[i].value)
					num++
				}
			}
		}
	}
		xhr.open('post','__APP__/Mall/Classify/ajax_shangchuan',true)
		xhr.send(data)
		}
			//删除按钮操作ul移除li
			del = document.getElementsByClassName('del')
			for(i in del){
				del[i].onclick = function(e){
					this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode)
				}
			}
			//歌词
			lyric = document.getElementsByClassName('lyric')
			for(i in lyric){
					lyric[i].onchange = function(){
					if(this.files[0]){
						console.log(this.files[0])
						this.parentNode.nextSibling.nextSibling.innerHTML = this.files[0].name;
						var data = new FormData();
						data.append('file',this.files[0])
						var xhr = new XMLHttpRequest();
						xhr.onreadystatechange=function(){
							if(xhr.readyState==4){
								if(xhr.status==200){
									console.log('数据请求成功')
									console.log(xhr.response)
								}
							}
						}
						xhr.open('post','__APP__/Mall/Classify/ajax_shangchuan',true);
						xhr.send(data);
					}
				}
			}
			//衬底
			chendi = document.getElementsByClassName('chendi');
			
			for(i in chendi){
					chendi[i].onchange = function(){
					if(this.files[0]){
						this.parentNode.nextSibling.nextSibling.innerHTML = '已选'+this.files.length+'个图片'
						this.parentNode.nextSibling.nextSibling.nextSibling.nextSibling.value = this.files.length;
						var formcd = document.getElementById('formcd')
							var data = new FormData(formcd);
							var xhr = new XMLHttpRequest();
							xhr.onreadystatechange=function(){
								if(xhr.readyState==4){
									if(xhr.status==200){
										console.log('数据请求成功')
										console.log(xhr.response)
									}
								}
							}
							xhr.open('post','__APP__/Mall/Classify/ajax_shangchuan',true);
							xhr.send(data);
						
					}
				}
			}
	
			//详细信息展示
			toggle = document.getElementsByClassName('item')
			for(var n in toggle){
				toggle[n].onclick = function(){
						var el = sibling(this.parentNode)
						for(j in el){
							el[j].style.display =='block'?el[j].style.display = 'none':el[j].style.display = 'block';
						}
					}
			}
	}

	//获取兄弟元素
	function sibling( elem ) {
		var r = [];
		var n = elem.parentNode.firstChild;
		for ( ; n; n = n.nextSibling ) {
			if ( n.nodeType === 1 && n !== elem ) {
				r.push( n );
			}
		}
		return r;
	}
	
</script>
							<input name="id" type="hidden" value="{$data.id}"/>	
						</form>						
						
					</div>
					<!-- end widget content -->
					
				</div>
				<!-- end widget div -->
				
			</div>
			<!-- end widget -->	

		</article>
		<!-- END COL -->

		
	<br>
	<br>
	</div>

	<!-- END ROW -->
	
</block>
<block name="Script">
	
  <!-- FooTable Plugin -->
  <script src="__ABSOLUTEADMIN__/vendor/plugins/footable/js/footable.all.min.js"></script>
   <!-- FooTable Addon -->
  <script src="__ABSOLUTEADMIN__/vendor/plugins/footable/js/footable.filter.min.js"></script>

						<script>
							function tijiao(){
									var style = $("#style").val();
									var isrc = $("#isrc").val();
									if(style == null){
										layer.msg("请选择风格");
										return false;
									}
									if(isrc == ''){
										layer.msg("请输入专辑唯一标示");
										return false;
									}
									
								}
								
							//新增配置
							//新增配置
							function change(){  
							
								var username = $("#username").val();
								var nickname = $("#nickname").val();
								
								var tel = $("#tel").val();
								var email = $("#email").val();
								var img = $("#newbikephotoName").val();
								
								$.ajax({
									type:'POST',
									url:"__APP__/Admin/User/Create.html",
									data:{
										
										"username": username,
										"nickname": nickname,
										"tel": tel,
										"email": email,
										"img": img,
									},
									success:function(data){			
										var info = eval(data)
										if (info.errcode == 0) {
										
											layer.msg(info.errmsg);
											setTimeout(window.location.reload(),3000);
											
										}else{
											layer.msg(info.errmsg);
										}
									},
									error:function(){
										layer.msg('系统繁忙,请稍候重试！');
									}
								
								});	 
							} 
							//新增配置
							//新增配置
							function delete_song(id){  
							
								$.ajax({
									type:'POST',
									url:"__APP__/Mall/Classify/delete_song.html",
									data:{
										"id": id,
									},
									success:function(info){	
										if (info == 1) {
											layer.msg("删除成功");
										}else{
											layer.msg("删除失败");
										}
									},
									error:function(){
										layer.msg('系统繁忙,请稍候重试！');
									}
								
								});	 
							}  
							</script>
 <script type="text/javascript">
  jQuery(document).ready(function() {

 

    // Init FooTable Examples
    $('.footable').footable();


  });
  </script>
</block>